getDate Method (DateFormat) |
Returns the JavaScript Date object from the value set on the element
Syntax
dateFormatObj.getDate(elmt)
Parameters
Parameter |
Description |
---|---|
elmt |
Required. The date element on which you want to get the Date object. |
Return Value
Returns the JavaScript Date object.
Remarks
Value of the element must be according to the display format.
Example
The following example displays how this method is used.
importType("wcp.library.util.LocaleFormat"); importType("wcp.library.util.DateFormat"); var dateFormat = new DateFormat("longdate", "en-US", elmt); elmt.value="Tuesday, January 29, 2013"; dateFormat.getDate(elmt);